﻿@namespace MudBlazor

@if (Enabled)
{
    <div class="@PopoverService.PopoverOptions.ContainerClass">
        <SectionOutlet SectionName="mud-overlay-to-popover-provider" />
        @foreach (var handler in PopoverService.ActivePopovers)
        {
            <MudRender @ref="handler.ElementReference" @key="handler.Id">
                <div id="@($"popovercontent-{handler.Id}")" data-ticks="@(handler.ActivationDate?.Ticks ?? 0)" @attributes="@handler.UserAttributes" class="@handler.Class" style="@handler.Style">
                    @if (handler.ShowContent)
                    {
                        @handler.Fragment
                    }
                </div>
            </MudRender>
        }
    </div>
}
